﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using NHibernate;
using FluentNHibernate.Data;

namespace BankCreditPortfolio.DAL.Entities
{
    public class Banker
    {
        public virtual int BankerId { get; set; }
        public virtual Account Account { get; set; }
        public virtual Profile Profile { get; set; }
    }

    public class BankerMap : ClassMap<Banker>
    {
        public BankerMap()
        {
            Id(x => x.BankerId).GeneratedBy.HiLo("banker");
            Id(x => x.BankerId).Unique();
            References(x => x.Account).Column("AccountId");
            References(x => x.Profile).Column("ProfileId");
            Table("Banker");
        }
    }
}
